<#-- Map jdbc type to java type-->
<#function jdbc2java jdbcType>
	<#assign jdbcType = jdbcType?lower_case>
	<#if jdbcType?contains("char") || jdbcType == "varchar" || jdbcType == "longvarchar">
		<#return "String">
	<#elseif jdbcType == "numeric" || jdbcType == "decimal">
		<#return "BigDecimal">
	<#elseif jdbcType == "bit">
		<#return "Boolean">
	<#elseif jdbcType == "tinyint">
		<#return "Byte">
	<#elseif jdbcType == "smallint">
		<#return "Short">
	<#elseif jdbcType == "integer">
		<#return "Integer">
	<#elseif jdbcType == "bigint">
		<#return "Long">
	<#elseif jdbcType == "real">
		<#return "Float">
	<#elseif jdbcType == "Float">
		<#return "Double">
	<#elseif jdbcType == "binary" || jdbcType == "varbinary" || jdbcType == "longvarbinary">
		<#return "byte[]">
	<#elseif jdbcType == "date">
		<#return "Date">
	<#elseif jdbcType == "time">
		<#return "Time">
	<#elseif jdbcType == "timestamp">
		<#return "Timestamp">
	<#else>
		<#return "int">
	</#if>
</#function>

<#-- Generate test data for orcale data type-->
<#function generateOracleData jdbcType, seed>
	<#assign jdbcType = jdbcType?lower_case>
	<#if jdbcType?contains("char") || jdbcType == "varchar" || jdbcType == "longvarchar">
		<#return '"X' + seed + '"'>
	<#elseif jdbcType == "numeric" || jdbcType == "decimal">
		<#return seed>
	<#elseif jdbcType == "bit">
		<#return seed>
	<#elseif jdbcType == "tinyint">
		<#return seed>
	<#elseif jdbcType == "smallint">
		<#return seed>
	<#elseif jdbcType == "integer">
		<#return seed>
	<#elseif jdbcType == "bigint">
		<#return seed>
	<#elseif jdbcType == "real">
		<#return seed>
	<#elseif jdbcType == "Float">
		<#return seed>
	<#elseif jdbcType == "binary" || jdbcType == "varbinary" || jdbcType == "longvarbinary">
		<#return "byte[]">
	<#elseif jdbcType == "date">
		<#return now>
	<#elseif jdbcType == "time">
		<#return now>
	<#elseif jdbcType == "timestamp">
		<#return now>
	<#else>
		<#return "int">
	</#if>
</#function>

<#-- Generate test data for orcale data type-->
<#function generateOracleData4SQL jdbcType, seed>
	<#assign jdbcType = jdbcType?lower_case>
	<#if jdbcType?contains("char") || jdbcType == "varchar" || jdbcType == "longvarchar">
		<#return "'X" + seed + "'">
	<#else>
		<#return generateOracleData(jdbcType, seed)>
	</#if>
</#function>

<#-- Map jdbc type to java type-->
<#function jdbc2mssql jdbcType>
	<#return jdbcType>
</#function>

<#function getTypePackage javaType>
	<#assign javaType = javaType?lower_case>
	<#if javaType == "numeric" || javaType == "decimal">
		<#return "java.math.BigDecimal">
	<#elseif javaType == "date">
		<#return "java.sql.Date">
	<#elseif javaType == "time">
		<#return "java.sql.Time">
	<#elseif javaType == "timestamp">
		<#return "java.sql.Timestamp">
	<#else>
		<#return "">
	</#if>
</#function>